public String getDate() {
        return date;
    }

    public double getAmount() {
        return amount;
    }

    public String getCategory() {
        return category;
    }


public void queryRecords(String startDate, String endDate, String category) {
        System.out.println("查询结果:");

        // 查询收入记录
        System.out.println("收入记录:");
        for (Record record : incomeRecords) {
            if ((record.getDate().compareTo(startDate) >= 0 && record.getDate().compareTo(endDate) <= 0) &&
                (category == null || category.isEmpty() || record.getCategory().equalsIgnoreCase(category))) {
                System.out.println(record);
            }
        }

        // 查询支出记录
        System.out.println("\n支出记录:");
        for (Record record : expenseRecords) {
            if ((record.getDate().compareTo(startDate) >= 0 && record.getDate().compareTo(endDate) <= 0) &&
                (category == null || category.isEmpty() || record.getCategory().equalsIgnoreCase(category))) {
                System.out.println(record);
            }
        }
    }
    